package dao.region;

import java.util.List;

import vo.RegionVO;

import com.ibatis.sqlmap.client.SqlMapClient;

public class RegionDAOImpl implements RegionDAO{

	private SqlMapClient sqlMapClient;

	public void setSqlMapClient(SqlMapClient sqlMapClient) {
		this.sqlMapClient = sqlMapClient;
	}

	@Override
	public List<RegionVO> getRegionList() throws Exception {
		return sqlMapClient.queryForList("region.getRegionList");
	}

	@Override
	public void registerRegion(String region_name) throws Exception {
		sqlMapClient.insert("region.registerRegion", region_name);
	}

	@Override
	public void updateRegion(RegionVO param) throws Exception {
		sqlMapClient.update("region.updateRegion", param);
	}

	@Override
	public void deleteRegion(int region_no) throws Exception {
		sqlMapClient.update("region.deleteRegion", region_no);
	}
}
